<?php

use Illuminate\Database\Schema\Blueprint;

class CreateFiles extends \App\Utils\CreateMigration
{

    function columns(Blueprint $table)
    {
        $table->string('name', 50)->nullable()->comment('名称');
        $table->string('module', 50)->nullable()->comment('模块');
        $table->string('path')->nullable()->comment('文件地址');
        $table->string('md5')->nullable()->comment('md5');
        $table->unsignedTinyInteger('type')->default(1)->comment('文件类型');
        $table->index(['deleted_at', 'module'], 'index_deleted_module');
    }

    function tableInfo()
    {
        return ['files','文件'];
    }
}
